<template>
  <div>
    <el-container>
      <el-header class="layout-header">
        <div style="float: right; height: 60px; line-height: 60px;">
          <el-button size="mini" @click="logout()">退出登录</el-button>
        </div>
        <h3 style="line-height: 60px;">书城管理平台</h3>
      </el-header>
      <el-container class="layout-body">
        <el-aside class="layout-aside">

          <el-menu
              router
              :default-active="this.$router.currentRoute.path"
              unique-opened
              class="el-menu-vertical-demo"
              background-color="#417383"
              text-color="#fff"
              active-text-color="#e7d714">
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-user"></i>
                <span>用户管理</span>
              </template>
              <el-menu-item index="/users/user/list">
                <i class="el-icon-s-unfold"></i>
                <span>用户列表</span>
              </el-menu-item>
              <el-menu-item index="/users/user/upgrade">
                <i class="el-icon-plus"></i>
                <span>用户升级</span>
              </el-menu-item>
            </el-submenu>
            <el-submenu index="6">
              <template slot="title">
                <i class="el-icon-s-release"></i>
                <span>订单列表管理</span>
              </template>
              <el-menu-item index="/admin/order-from/list">
                <i class="el-icon-s-unfold"></i>
                <span>订单列表</span>
              </el-menu-item>
              <el-menu-item index="/admin/order-from/add-new">
                <i class="el-icon-plus"></i>
                <span>添加订单</span>
              </el-menu-item>
            </el-submenu>
          </el-menu>
        </el-aside>
        <el-main>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style>
* {
  margin: 0;
}
.layout-header {
  background: #2d4e58;
  color: #fff;
}

.layout-body {
  position: absolute;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
}

.layout-aside {
  background: #2d4e58;
}
</style>

<script>
export default {
  methods: {
    logout() {
      localStorage.clear();
      this.$router.push('/');
    },

  }
}
</script>